id/email
password
forgot password | create account
about | help | prefs
ReadingBatcode reading practice

 

 

Athenian: Stringsstrings_format

prev  |  next  |  chance

Converting string cases

def case(name):
    if "A" in name:
        return name.upper()
    elif "e" in name:
        return name.lower()
    else:
        return name.title()
Function Call  Return Value
case('Anna')
case('MIGUEL')
case('FRed')
case('Mr. Rodgers')
case('oliVia')

Experiment with this code on Gitpod.io

⬅ Back